package com.joymeter.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName AppConfig
 * @Description TODO 配置文件
 * @Author liang
 * @Date 2018/8/15 11:03
 * @Version 1.0
 **/
@Component
public class AppConfig {
    @Value("${URL.DRUID}")
    private String DRUID_URL;

    @Value("${URL.CJOYSERVERS}")
    private String CJOYSERVERS_URL;
    public String getDataInfoURL() {
        return this.DRUID_URL + ":8200/v1/post/dataInfo";
    }

    public String getOfflineURL() {
        return this.DRUID_URL + ":8200/v1/post/offline";
    }

    public String getUsageURL() {
        return this.DRUID_URL + ":8200/v1/post/usage";
    }

    public String getQueryURL() {
        return this.DRUID_URL + ":8082/druid/v2/sql/";
    }

    public String getCjoyUpdateStatusURL() {
        return this.CJOYSERVERS_URL + "/api/DeviceController/updateStatus";
    }
}